package com.sun.abilities.thread.application;

public class Main {

	public static void main(String[] args) {
		ObServ2 o2 = new ObServ2();
		o2.start();
		
		ObServ1 o1 = new ObServ1();
		new Thread(o1).start();
		
		ObObject o =  new ObObject(o2,o1);
		synchronized(o) {
			try{
				o.wait(3000);//等待5秒
				System.out.println("=======第一批任务开始");
				o.change(500);
				System.out.println("=======第二批任务开始");
				o.change(100);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}

}
